﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using UtilsBase;
using UtilsCache;
using UtilsORM.MySqlData;

namespace UtilsORM
{
    public class EFYihongIotContext : yihongIotContext
    {

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {

                   optionsBuilder.UseMySql(UtilAppsettingCache.getSetting("MySqlserver:ConnectionString_yihongIOT"), ServerVersion.Parse("8.0.33-mysql"));

            }
        }
    }
}
